package com.edgar.baselibrary.utils;

import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

/**
 * Created by edgar on 2015/11/14.
 */
public final class ViewUtils {

    private ViewUtils(){}

    public void setImage(ImageView imageView,int resId){
        imageView.setImageResource(resId);
    }

    public void setText(TextView textView,int resId){
        textView.setText(resId);
    }

    public void setText(TextView textView,CharSequence charSequence){
        textView.setText(charSequence);
    }

    public void setTextColor(TextView textView,int color){
        textView.setTextColor(color);
    }

    public void setTextSize(TextView textView,int size){
        textView.setTextSize(size);
    }

    public void setLayoutParams(View view,int width,int height){
        view.setLayoutParams(new ViewGroup.LayoutParams(width,height));
    }
}